package day27;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class TestServer {
    public static void main(String[] args) throws IOException {
        //1.创建服务端对象提供端口号
        ServerSocket server = new ServerSocket(9999);
        //2.等待客户端连接
        Socket client = server.accept();
        System.out.println(client);
    }
}
